package com.bsoft.gol.hcb.service.templateSheet.rpc.entity;

import javax.persistence.*;
import java.io.Serializable;
import java.sql.Date;

/**
 * Created by yangyi on 2017/10/19.
 */
@Entity
@Table(name = "visit_module")
public class VisitModule implements Serializable {
    private int id;
    private Integer pid;
    private Integer level;
    private String title;
    private String code;
    private String memo;
    private Long createdby;
    private Date createdon;
    private Long modifiedby;
    private Date modifiedon;
    private Byte isdeleted;
    private String platformMethodName;
    private String platformMethodCode;

    @Id
    @Column(name = "id")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "pid")
    public Integer getPid() {
        return pid;
    }

    public void setPid(Integer pid) {
        this.pid = pid;
    }

    @Basic
    @Column(name = "level")
    public Integer getLevel() {
        return level;
    }

    public void setLevel(Integer level) {
        this.level = level;
    }

    @Basic
    @Column(name = "title")
    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    @Basic
    @Column(name = "code")
    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    @Basic
    @Column(name = "memo")
    public String getMemo() {
        return memo;
    }

    public void setMemo(String memo) {
        this.memo = memo;
    }

    @Basic
    @Column(name = "createdby")
    public Long getCreatedby() {
        return createdby;
    }

    public void setCreatedby(Long createdby) {
        this.createdby = createdby;
    }

    @Basic
    @Column(name = "createdon")
    public Date getCreatedon() {
        return createdon;
    }

    public void setCreatedon(Date createdon) {
        this.createdon = createdon;
    }

    @Basic
    @Column(name = "modifiedby")
    public Long getModifiedby() {
        return modifiedby;
    }

    public void setModifiedby(Long modifiedby) {
        this.modifiedby = modifiedby;
    }

    @Basic
    @Column(name = "modifiedon")
    public Date getModifiedon() {
        return modifiedon;
    }

    public void setModifiedon(Date modifiedon) {
        this.modifiedon = modifiedon;
    }

    @Basic
    @Column(name = "isdeleted")
    public Byte getIsdeleted() {
        return isdeleted;
    }

    public void setIsdeleted(Byte isdeleted) {
        this.isdeleted = isdeleted;
    }

    @Basic
    @Column(name = "platform_method_name")
    public String getPlatformMethodName() {
        return platformMethodName;
    }

    public void setPlatformMethodName(String platformMethodName) {
        this.platformMethodName = platformMethodName;
    }

    @Basic
    @Column(name = "platform_method_code")
    public String getPlatformMethodCode() {
        return platformMethodCode;
    }

    public void setPlatformMethodCode(String platformMethodCode) {
        this.platformMethodCode = platformMethodCode;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }

        VisitModule that = (VisitModule) o;

        if (id != that.id) {
            return false;
        }
        if (pid != null ? !pid.equals(that.pid) : that.pid != null) {
            return false;
        }
        if (level != null ? !level.equals(that.level) : that.level != null) {
            return false;
        }
        if (title != null ? !title.equals(that.title) : that.title != null) {
            return false;
        }
        if (code != null ? !code.equals(that.code) : that.code != null) {
            return false;
        }
        if (memo != null ? !memo.equals(that.memo) : that.memo != null) {
            return false;
        }
        if (createdby != null ? !createdby.equals(that.createdby) : that.createdby != null) {
            return false;
        }
        if (createdon != null ? !createdon.equals(that.createdon) : that.createdon != null) {
            return false;
        }
        if (modifiedby != null ? !modifiedby.equals(that.modifiedby) : that.modifiedby != null) {
            return false;
        }
        if (modifiedon != null ? !modifiedon.equals(that.modifiedon) : that.modifiedon != null) {
            return false;
        }
        if (isdeleted != null ? !isdeleted.equals(that.isdeleted) : that.isdeleted != null) {
            return false;
        }

        return true;
    }

    @Override
    public int hashCode() {
        int result = id;
        result = 31 * result + (pid != null ? pid.hashCode() : 0);
        result = 31 * result + (level != null ? level.hashCode() : 0);
        result = 31 * result + (title != null ? title.hashCode() : 0);
        result = 31 * result + (code != null ? code.hashCode() : 0);
        result = 31 * result + (memo != null ? memo.hashCode() : 0);
        result = 31 * result + (createdby != null ? createdby.hashCode() : 0);
        result = 31 * result + (createdon != null ? createdon.hashCode() : 0);
        result = 31 * result + (modifiedby != null ? modifiedby.hashCode() : 0);
        result = 31 * result + (modifiedon != null ? modifiedon.hashCode() : 0);
        result = 31 * result + (isdeleted != null ? isdeleted.hashCode() : 0);
        return result;
    }
}
